// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
// 状态管理
import store from '@/store/index.js';
// 动态改变路由到状态管理
import { sync } from 'vuex-router-sync';
import './base/axios.js';
import 'iview/dist/styles/iview.css';
import { Icon, Input, Checkbox, CheckboxGroup, Table, Page, Poptip, Tooltip, Layout, Spin,Header,Content,Button,Modal,Form,FormItem,Row,Col,Select,Option } from 'iview';

// 初始化路由状态
sync(store, router);

Vue.config.productionTip = false
Vue.component('Icon', Icon)
Vue.component('Input', Input)
Vue.component('Checkbox', Checkbox)
Vue.component('Table', Table)
Vue.component('CheckboxGroup', CheckboxGroup)
Vue.component('Page', Page)
Vue.component('Poptip', Poptip)
Vue.component('Tooltip', Tooltip)
Vue.component('Layout', Layout)
Vue.component('Spin', Spin)
Vue.component('Header', Header)
Vue.component('Content', Content)
Vue.component('Button', Button)
Vue.component('Modal', Modal)
Vue.component('Form', Form)
Vue.component('FormItem', FormItem)
Vue.component('Row', Row)
Vue.component('Col', Col)
Vue.component('Select',Select)
Vue.component('Option',Option)
/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    store,
    components: { App },
    template: '<App/>'
})